<!-- src/main/resources/templates/pictrue/edit.html -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑图片</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/editstyles.css}">
</head>
<body>
<h2>编辑图片</h2>

<form th:object="${picture}" th:action="@{'/pictrue/edit/' + ${picture.id}}" method="post">
    <label>图片编号:</label>
    <input type="text" th:field="*{id}" readonly="readonly" />

    <label>图片标题:</label>
    <input type="text" th:field="*{title}" />

    <label>图片内容:</label>
    <textarea th:field="*{content}"></textarea>

    <label>图片地址:</label>
    <input type="text" th:field="*{url}" />

    <label>用户编号:</label>
    <input type="text" th:field="*{user_id}" />

    <button type="submit">保存</button>
    <a th:href="@{/pictrue/findAll}" class="cancel-btn">取消</a>
</form>
</body>
</html>
